
<?php showLeftNavigation($this->aDisplayedContent['productsANDcategories'], "");?>

<?php function showLeftNavigation($aPageStructureNested, $sUlID = ""){
    
    echo "<ul $sUlID>";
    foreach ($aPageStructureNested as $aPage){
                
        $sUlClass = '';
        $sLiClass = "";
        $sAClass = '';
        $sBeginSpan = '';
        $sEndSpan = '';
        
        $iPageID = $aPage['id'];
        $sPageName = $aPage['name'];
        $sPageLevel = $aPage['level'];
        $sPageLink = $aPage['link'];
        
        
        echo "<li $sLiClass><a href='$sPageLink' $sAClass>$sBeginSpan $sPageName $sEndSpan</a>";
        if(!empty($aPage['subPages'])){
            showLeftNavigation($aPage['subPages'], $sUlClass);
     }?></li><?php 
    }
    echo "</ul>";
  }
?>


